package cn.darkhorse.ticket.production.service.impl;

import cn.darkhorse.ticket.production.pojo.TicketProductionPlanProductInfo;
import cn.darkhorse.ticket.production.mapper.TicketProductionPlanProductInfoMapper;
import cn.darkhorse.ticket.production.service.TicketProductionPlanProductInfoService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 计划产品明细 服务实现类
 * </p>
 *
 * @author maoguanjun
 * @since 2024-01-19
 */
@Service
public class TicketProductionPlanProductInfoServiceImpl extends ServiceImpl<TicketProductionPlanProductInfoMapper, TicketProductionPlanProductInfo> implements TicketProductionPlanProductInfoService {

    @Override
    public TicketProductionPlanProductInfo getByCode(String productCode,Long planId) {
        LambdaQueryWrapper<TicketProductionPlanProductInfo> wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(TicketProductionPlanProductInfo::getPlanId,planId);
        wrapper.eq(TicketProductionPlanProductInfo::getProductCode,productCode);
        return getOne(wrapper);
    }
}
